#ifndef PICCOLO_ENTRY_POINT_H
#define PICCOLO_ENTRY_POINT_H

#include "PiccoloEngine.h"
#include "PiccoloApplication.h"

extern Piccolo::PiccoloApplication* CreateApplicationEntryPoint();

#if PICCOLO_ENGINE_PLATFORM_WIN32 || PICCOLO_ENGINE_PLATFORM_MACOS || PICCOLO_ENGINE_PLATFORM_LINUX

int main(int argc, char* argv[])
{
    std::cout << "Piccolo Engine starting..." << std::endl;
    Piccolo::PiccoloApplication* app = CreateApplicationEntryPoint();
    // 启动
    app->Start(argc, argv);
    // 主循环
    app->Tick();
    // 停止运行
    app->Stop();
    // 销毁
    delete app;
    return EXIT_SUCCESS;
}

#endif

#endif
